package com.markerhub.RabbitMQ;

import com.alibaba.fastjson.JSON;
import com.markerhub.Util.MallUtils;
import com.markerhub.entity.ElasticSearchBlog;
import org.elasticsearch.action.update.UpdateRequest;
import org.elasticsearch.action.update.UpdateResponse;
import org.elasticsearch.client.RequestOptions;
import org.elasticsearch.client.RestHighLevelClient;
import org.elasticsearch.common.xcontent.XContentType;
import org.springframework.amqp.rabbit.annotation.Queue;
import org.springframework.amqp.rabbit.annotation.RabbitHandler;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Component
@RabbitListener(queuesToDeclare = @Queue("mail"))
public class customer {

    @Autowired
    private MallUtils mallUtils;

    @RabbitHandler
    public void Emalls(String message){
        mallUtils.sendSimpleTextMailActual("注册成功","恭喜您成功注册成为新用户!",new String[]{message},null,null,null);
    }
}
